package com.ahem.demo.mapper;

import com.ahem.demo.entity.po.TTest;
import com.ahem.demo.entity.po.TTestExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface TTestMapper {

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_test
	 * @mbg.generated  Fri Jun 23 13:08:01 CST 2017
	 */
	@SelectProvider(type = TTestSqlProvider.class, method = "countByExample")
	long countByExample(TTestExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_test
	 * @mbg.generated  Fri Jun 23 13:08:01 CST 2017
	 */
	@DeleteProvider(type = TTestSqlProvider.class, method = "deleteByExample")
	int deleteByExample(TTestExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_test
	 * @mbg.generated  Fri Jun 23 13:08:01 CST 2017
	 */
	@Delete({ "delete from t_test", "where id = #{id,jdbcType=INTEGER}" })
	int deleteByPrimaryKey(Integer id);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_test
	 * @mbg.generated  Fri Jun 23 13:08:01 CST 2017
	 */
	@Insert({ "insert into t_test (id, name, ", "remark)", "values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, ",
			"#{remark,jdbcType=VARCHAR})" })
	int insert(TTest record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_test
	 * @mbg.generated  Fri Jun 23 13:08:01 CST 2017
	 */
	@InsertProvider(type = TTestSqlProvider.class, method = "insertSelective")
	int insertSelective(TTest record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_test
	 * @mbg.generated  Fri Jun 23 13:08:01 CST 2017
	 */
	@SelectProvider(type = TTestSqlProvider.class, method = "selectByExample")
	@Results({ @Result(column = "id", property = "id", jdbcType = JdbcType.INTEGER, id = true),
			@Result(column = "name", property = "name", jdbcType = JdbcType.VARCHAR),
			@Result(column = "remark", property = "remark", jdbcType = JdbcType.VARCHAR) })
	List<TTest> selectByExampleWithRowbounds(TTestExample example, RowBounds rowBounds);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_test
	 * @mbg.generated  Fri Jun 23 13:08:01 CST 2017
	 */
	@SelectProvider(type = TTestSqlProvider.class, method = "selectByExample")
	@Results({ @Result(column = "id", property = "id", jdbcType = JdbcType.INTEGER, id = true),
			@Result(column = "name", property = "name", jdbcType = JdbcType.VARCHAR),
			@Result(column = "remark", property = "remark", jdbcType = JdbcType.VARCHAR) })
	List<TTest> selectByExample(TTestExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_test
	 * @mbg.generated  Fri Jun 23 13:08:01 CST 2017
	 */
	@Select({ "select", "id, name, remark", "from t_test", "where id = #{id,jdbcType=INTEGER}" })
	@Results({ @Result(column = "id", property = "id", jdbcType = JdbcType.INTEGER, id = true),
			@Result(column = "name", property = "name", jdbcType = JdbcType.VARCHAR),
			@Result(column = "remark", property = "remark", jdbcType = JdbcType.VARCHAR) })
	TTest selectByPrimaryKey(Integer id);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_test
	 * @mbg.generated  Fri Jun 23 13:08:01 CST 2017
	 */
	@UpdateProvider(type = TTestSqlProvider.class, method = "updateByExampleSelective")
	int updateByExampleSelective(@Param("record") TTest record, @Param("example") TTestExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_test
	 * @mbg.generated  Fri Jun 23 13:08:01 CST 2017
	 */
	@UpdateProvider(type = TTestSqlProvider.class, method = "updateByExample")
	int updateByExample(@Param("record") TTest record, @Param("example") TTestExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_test
	 * @mbg.generated  Fri Jun 23 13:08:01 CST 2017
	 */
	@UpdateProvider(type = TTestSqlProvider.class, method = "updateByPrimaryKeySelective")
	int updateByPrimaryKeySelective(TTest record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_test
	 * @mbg.generated  Fri Jun 23 13:08:01 CST 2017
	 */
	@Update({ "update t_test", "set name = #{name,jdbcType=VARCHAR},", "remark = #{remark,jdbcType=VARCHAR}",
			"where id = #{id,jdbcType=INTEGER}" })
	int updateByPrimaryKey(TTest record);
}